<template>
  <div class="header">
    <div class="logo">
      <img src="@/assets/images/logo.svg" alt="" />
    </div>

    <div class="handler">
      <div class="to-shop btn">
        <img src="@/assets/images/imgGemSquare.png" alt="" />

        <span>Shop</span>
      </div>

      <div class="login-btn btn">Login</div>

      <div class="user">
        <img src="@/assets/images/user-avatar-fill.svg" alt="" />
      </div>
    </div>
  </div>

  <div class="diy-popup" v-if="false">
    <van-popup
      v-model:show="show"
      @click-overlay="show = false"
      position="bottom"
    >
      <div class="user-info">
        <div class="avatar">
          <img src="@/assets/images/user-avatar-fill.svg" alt="" />
        </div>

        <div class="info">
          <div class="name">名字</div>

          <div class="country">
            <div class="box">
              <img src="@/assets/images/uk.svg" alt="" />

              <span class="word">UK</span>
            </div>

            <div class="line">|</div>

            <div class="box">
              <img src="@/assets/images/male.svg" alt="" />

              <img src="@/assets/images/female.svg" alt="" />

              <span class="word">Male</span>
            </div>
          </div>
        </div>
      </div>

      <div class="handle-list">
        <div class="item">
          <img src="@/assets/images/Edit.svg" alt="" />

          <span class="word">Edit Profile</span>
        </div>

        <div class="item">
          <img src="@/assets/images/set.svg" alt="" />

          <span class="word">More</span>
        </div>

        <div class="item">
          <img src="@/assets/images/logout.svg" alt="" />

          <span class="word">LogOut</span>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script lang="ts">
// export default {
//     data() {
//         return {
//             loginStatus: false,
//             show: false
//         }
//     },
//     methods: {
//         loginClick() {
//             this.$router.push({path: '/login'})
//         },
//         showPopup() {
//             this.show = !this.show
//         }
//     }
// }
</script>

<style lang="less" scoped>
.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  height: 52px;
  // background: transparent;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  // background: linear-gradient(to right, #8e44ad, #3498db);
  color: white;
  font-size: 24px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  .logo {
    display: flex;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    img {
      height: 24px;
    }
  }
  .handler {
    display: flex;
    .to-shop {
      display: flex;
      justify-content: center;
      margin-right: 15px;
      img {
        height: 20px;
        margin-top: 6px;
        margin-right: 2px;
      }
    }
    .login-btn {
    }
    .user {
      img {
        width: 32px;
      }
    }
  }
}
.diy-popup {
  --van-popup-background: #333333;
  .van-overlay {
    background: rgba(0, 0, 0, 0.1);
  }
  .van-popup {
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    .user-info {
      padding: 15px 15px;
      display: flex;
      border-bottom: 1px solid rgb(68, 68, 68);
      .avatar {
        width: 44px;
        height: 44px;
        border-radius: 100%;
        overflow: hidden;
        display: flex;
        margin-right: 10px;
        img {
          width: 44px;
          height: 44px;
          border-radius: 100%;
        }
      }
      .info {
        display: flex;
        flex-direction: column;
        height: 44px;
        justify-content: center;
        .name {
          line-height: 20px;
        }
        .country {
          display: flex;
          margin: 0 0;
          line-height: 20px;
          .box {
            display: flex;
            .word {
              font-size: 10px;
              line-height: 20px;
            }
          }
          .line {
            color: #fff;
            font-size: 10px;
            margin: 0 5px;
          }
        }
      }
    }
    .handle-list {
      padding: 10px 30px;
      .item {
        display: flex;
        line-height: 32px;
        margin: 15px 0;
        img {
          width: 20px;
          height: 20px;
          margin-right: 15px;
          margin-top: 6px;
        }
        .word {
          color: #fff;
          font-weight: bold;
        }
      }
    }
  }
}
</style>
